<?php
include("header.php");
$noTplCheck = array("galerie", "contact", "admin_login");
if (!in_array($_GET['site'], $noTplCheck)) {
    if (!file_exists(HOME_PATH . "templates/" . $_GET['site'] . ".tpl"))
        $_GET['site'] = "index";

    $text->viewPart = $_GET['site'];
    $smarty->assign("text", $text->getText());
    //$smarty->assign("backgroundimage", $text->getBackgroundImage());
    $smarty->display($_GET['site'] . ".tpl");
} else
    include(HOME_PATH . $_GET['site'] . ".php");

include("footer.php");
?>